package com.qf.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import java.util.Date;

public class User {
    @JsonIgnore// 属性忽略
    private Integer id;
    private String name;
    private Double salary;
    @JsonFormat(pattern = "YYYY-MM-dd", timezone = "GMT+8")
    private Date birth;

    public User(Integer id, String name, Double salary, Date birth) {
        this.id = id;
        this.name = name;
        this.salary = salary;
        this.birth = birth;
    }

    public User() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getSalary() {
        return salary;
    }

    public void setSalary(Double salary) {
        this.salary = salary;
    }

    public Date getBirth() {
        return birth;
    }

    public void setBirth(Date birth) {
        this.birth = birth;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", salary=" + salary +
                ", birth=" + birth +
                '}';
    }
}
